<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title id="title">郴州农业大数据</title>
		<script src="js/mui.min.js"></script>
		<link href="css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" href="css/style.css" />
		<link rel="stylesheet" href="css/iconfont.css" />
		<link rel="stylesheet" href="css/css.css" />
		<script src="js/js/jquery.min.js"></script>
		<script src="js/js/jquery.leoweather.min.js"></script>
		<style>
			#demo {
				width: 100%;
				background: url(images/icon/background-img.jpg) no-repeat center top;
				color: #115638;
				height: 155px;
				overflow: hidden;
				position: relative;
				
			}
			
			.demobox{position: absolute; top: 27%; left: 10%; line-height: normal; width: 80%;}
			
			#demo p {
				background: rgba(0, 0, 0, .3);
				border-radius: 1000px;
				font-size: 5px;
				clear: both;
				color: #FFF;
			}
			
			#demo img {
				height: 100px;
				width: 100px;
				float: left;
			}
			
			#demo span {
				font-size: 30px;
			}
		</style>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<h1 class="mui-title" id="top_title">郴州农业大数据</h1>
		</header>
		<div class="mui-content dsj_content">
			<div id="demo">
				<script>
					$('#demo').leoweather({
						format: '<div class="demobox"><span>{气温}℃</span><span>{城市}</sapn><br/><span class="clearfix">{天气}{风向}{风级}级</sapn><span style="float:right;margin-top:-25%;margin-right:0;"><img src="images/icon/{图标}.png" /></span></div>'
					});
				</script>
			</div>
			<div class="index_nav">
				<ul class="mui-table-view mui-grid-view mui-grid-9">
					<li class="mui-table-view-cell" onclick="tiao(1)">
						<a href="javascript:;">
							<span class="mui-icon iconfont icon-hezuo"></span>
							<div class="mui-media-body">合作社</div>
						</a>
					</li>
					<li class="mui-table-view-cell" onclick="tiao(2)">
						<a href="javascript:;">
							<span class="mui-icon iconfont icon-nongmaoshipin"></span>
							<div class="mui-media-body">家庭农场</div>
						</a>
					</li>
					<li class="mui-table-view-cell">
						<a href="javascript:;" onclick="tiao(3)">
							<span class="mui-icon iconfont icon-nongchangzhongxin"></span>
							<div class="mui-media-body">农家乐</div>
						</a>
					</li>
					<li class="mui-table-view-cell" onclick="tiao(4)">
						<a href="javascript:;">
							<span class="mui-icon iconfont icon-qiye"></span>
							<div class="mui-media-body">龙头企业</div>
						</a>
					</li>
				</ul>
			</div>

			<div class="index_list">
				<ul class="mui-table-view mui-grid-view mui-grid-9">
					<li class="mui-table-view-cell">
						<a href="talents/rc_seach.html">
							<span class="mui-icon iconfont icon-rencaizhaopin"></span>
							<div class="mui-media-body">人才数据</div>
						</a>
					</li>
					<li class="mui-table-view-cell">
						<a href="nj/nj_seach.html">
							<span class="mui-icon iconfont icon-nongji"></span>
							<div class="mui-media-body">农机数据</div>
						</a>
					</li>
					<li class="mui-table-view-cell">
						<a href="./serve/serve_list.html">
							<span class="mui-icon iconfont icon-fuwuxiangmu"></span>
							<div class="mui-media-body special">服务项目</div>
						</a>
					</li>
				</ul>
			</div>
			<div class="index_list2">
				<div class="ejbt"><span class="iconfont icon-xinxizhongxin"></span>信息中心</div>
				<ul class="mui-table-view ccct">
					
				</ul>
			</div>

		</div>

		<div id="footer"></div>
		<div id="allmap"></div>

	</body>

</html>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script src="js/app.js" type="text/javascript"></script>
<script type="text/javascript" src="js/castapp.js"></script>
<script type="text/javascript" src="js/layer/layer.min.js"></script>
<script type="text/javascript">
	getFoot(getUrlParam("foot_active") > 0 ? getUrlParam("foot_active") : 1);

	$(function() {

		var group_id = '1';
		var member = JSON.parse(localStorage.getItem("member"));
		if(member) {
			if(member['group_id'] == 2) {
				group_id = '2';
			}
		}
		$.ajax({
			//请求的url
			//注意，如果我们使用路由器的情况下，我们需要设置一下本地服务器的ip地址
			url: APP.api_url + 'News/index',
			data: {
				group_id: group_id
			},
			dataType: 'JSONP', // 处理Ajax跨域问题
			//成功了的回调，并且带有返回值
			success: function(data) {
				//layer.msg(data.msg);
				if(data.code == 200) {
					var mem_list = data.list;
					var mem_htm = "";
					for(var i = 0; i < mem_list.length; i++) {
						if(i <= 4) {
							mem_htm += '<div><ul class="mui-table-view">' +
								'<li class="mui-table-view-cell mui-media">' +
								'<div style="background-color: white;height: 35px;font-size: 20px;">' +
								'<a  onclick=quer_mem(' + mem_list[i].id + ') class="mui-icon iconfont icon-icon147" style="margin-left:13px;line-height:35px;"> ' + mem_list[i].name + '</a>' +
								'</div>' +
								"<a>" +
								'</a></li>' +
								'</ul></div>';
						}
					}
					$(".ccct").html(mem_htm);
				} else {
					console.log(data.msg);
				}
			}
		});
	});

	function quer_mem(id) {
		var member = JSON.parse(localStorage.getItem("member"));
		if(!member) {
			layer.msg('请登录', {
				icon: 2,
				time: 1500,
				shade: 0.1
			});
			window.location.href = "login.html";
		} else {
			window.location.href = "new_list.html?id=" + id;
		}

	}

	function tiao(k) {
		window.location.href = "shop/shoplist.html?k=" + k;
	}
</script>